package com.mp.approvalreq.dao;

import com.mp.approvalreq.entity.Query;
import com.mp.approvalreq.entity.Request;

import java.sql.SQLException;
import java.util.List;
import java.util.Set;

public interface SearchDao {

	/**
	 * 搜索用户批准/驳回的审批列表
	 *
	 * @param query
	 * @param templateIds
	 * @param keywordIdSet
	 * @return
	 * @throws SQLException
	 */
	List<Request> selectRequestApprovedByUser(Query query, List<Integer> templateIds, Set<Integer> keywordIdSet) throws SQLException;

	/**
	 * 搜索用户待审批审批列表
	 *
	 * @param query
	 * @param templateIds
	 * @param keywordIds
	 * @return
	 * @throws SQLException
	 */
	List<Request> selectRequestNeedUserApprove(Query query, List<Integer> templateIds, Set<Integer> keywordIds) throws SQLException;

	/**
	 * 搜索用户申请的审批列表
	 * @param query
	 * @param templateIds
	 * @return
	 * @throws SQLException
	 */
	List<Request> selectRequestAppliedByUser(Query query, List<Integer> templateIds) throws SQLException;

	/**
	 * 搜索参与审批
	 *
	 * @param request
	 * @param templateIds
	 * @param keywordIds
	 * @return
	 * @throws SQLException
	 */
	List<Request> selectRequestParticipatedByUser(Query request, List<Integer> templateIds, Set<Integer> keywordIds) throws SQLException;

	/**
	 * 搜索抄送我的
	 *
	 * @param query
	 * @param templateIds
	 * @param keywordIds
	 * @param filedStatus 归档状态 1.未归档; 2.已归档
	 * @return
	 * @throws SQLException
	 */
	List<Request> selectRequestApprovedCcToMe(Query query, List<Integer> templateIds, Set<Integer> keywordIds, Integer filedStatus) throws SQLException;
}
